#不定长参数
#带一个*不定长参数
def fun1(*args):
    for arg in args :
        print(arg)

#带两个*不定长参数

def fun2(**kwargs):
    arg1 = kwargs.get('arg1')
    arg2 = kwargs.get('arg2')
    arg3 = kwargs.get('arg3')
    arg4 = kwargs.get('arg4')
    print(arg1,arg2,arg3,arg4)
if __name__ == '__main__' :
    fun1(1,2,3,4)

    fun2(arg1='yu',arg2=(1,2,3),arg3=True)

    #拆包

    args = [10,20,30,40]
    fun1(*args)

    dict = {'arg1':'yu','arg2':(1,2,3),'arg3':True}
    fun2(**dict)

    fun1(*[10,20,30,40])
    fun2(**{'arg1':'yu','arg2':(1,2,3),'arg3':True})

    print(*[10,20,30,40])
